import {userInfoStore} from "@/stores/counter.js";


export default {
    mounted(element, bindings) {
        let [name, method] = bindings.value;

        const info = userInfoStore()
        const methodList = info.userPermission[name];
        if (!methodList) {
            element.parentNode && element.parentNode.removeChild(element);
            return
        }
        if (methodList.indexOf(method) === -1) {
            element.parentNode && element.parentNode.removeChild(element);
            return
        }
    }
}